From: Jasper St. Pierre Date: Mon, 14 Oct 2013 02:53:58 +0000 (-0400) Subject: messageTray: Don't remove and re-add the focus group on button changes X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3204 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=96aa33f4efdfeea73fd2672dd1f825907350c630;p=gnome-shell.git messageTray: Don't remove and re-add the focus group on button changes https://bugzilla.gnome.org/show_bug.cgi?id=710115 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 76ba60bc3..c66c9f6fa 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -848,7 +848,6 @@ const Notification = new Lang.Class({ // %action-invoked signal with @id as a parameter addButton: function(id, label) { if (!this._buttonBox) { - let box = new St.BoxLayout({ style_class: 'notification-actions' }); this.setActionArea(box, { x_expand: false, y_expand: false, @@ -856,6 +855,7 @@ const Notification = new Lang.Class({ y_fill: false, x_align: St.Align.END }); this._buttonBox = box; + global.focus_manager.add_group(this._buttonBox); } let button = new St.Button({ can_focus: true }); @@ -870,11 +870,7 @@ const Notification = new Lang.Class({ button.label = label; } - if (this._buttonBox.get_n_children() > 0) - global.focus_manager.remove_group(this._buttonBox); - this._buttonBox.add(button); - global.focus_manager.add_group(this._buttonBox); button.connect('clicked', Lang.bind(this, this._onActionInvoked, id)); this.updated();